/**
 * Created by BigBi on 2017/4/12.
 */
//将一个(匿名)函数作为另一个函数的参数
function execute(somefunc,val){
    somefunc(val);
}

execute(function(hi){
    console.log(hi);
},'oh my god');//hi=='oh my god'参数值


var http = require('http');

function httpRequest(resquest,response){
    console.log(resquest);
    response.writeHead(200,{"Content-Type":"text/plain"});
    response.write('hello, i am on requesting');
    response.end();
}

http.createServer(httpRequest).listen(3000);//这里的方法 不要 ()
